import QtQuick 2.0

Item {
    property string title;
    property string note;
    property bool isPinned: false
    property int titleOffset: 10

    width: noteText.width + 80
    height: titleText.height + noteText.height + 100


    Rectangle {
        id: borders
        anchors.fill: parent
        gradient: Gradient {
            GradientStop { position: 0.0; color: "#FCF0AD" }
            GradientStop { position: 1.0; color: "#ffe036" }
        }

        border.color: "black"
        border.width: 1
        radius: 10
    }

    Text {
        id: titleText
        y: titleOffset
        text: title
        font.family: "Helvetica"
        font.pointSize: 30
        color: "Black"
        anchors.horizontalCenter: borders.horizontalCenter
    }

    Text {
        id: noteText
        x: 20
        y: 80
        text: note
        font.family: "Helvetica"
        font.pointSize: 20
        color: "Black"
        width: 220
        wrapMode: Text.WordWrap
        anchors.horizontalCenter: borders.horizontalCenter
    }

    NoteMenu {
        id: menu
    }


    MouseArea {
        anchors.fill: parent
        drag.target: parent
        propagateComposedEvents: true
    }
}
